package com.umeox.zikrringtest.single_test

import java.util.*

class PrayerTimeCalculator {

    private val prayerTimeCalc = PrayerTimeCalc()

    fun getPrayerList(
        params: DoubleArray,
        factionsIndex: Int,
        timeZone: Double,
        latitude: Double,
        longitude: Double,
        date: Date
    ): MutableList<String> {
        prayerTimeCalc.updateParams(
            params,
            factionsIndex,
            timeZone,
            latitude,
            longitude
        )

        val calendar = Calendar.getInstance()
        calendar.time = date

        val source = prayerTimeCalc.getPrayerTimes(
            calendar[Calendar.YEAR],
            calendar[Calendar.MONTH] + 1,
            calendar[Calendar.DAY_OF_MONTH]
        )

        source.removeLast()
        return source
    }

}